<?php

namespace App\Library\Service;

use App\Library\Logic\ActivityZoneLogic;
use Illuminate\Http\JsonResponse;

class ActivityZoneService extends BaseService
{
    public function __construct(ActivityZoneLogic $logic)
    {
        $this->logic= $logic;
    }

    /**
     * index
     * @return JsonResponse
     *
     */
    public function index(): JsonResponse
    {
        return success($this->logic->query()->where('is_show', 1)->orderByDesc('created_at')->get());
    }
}
